home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY3 / POV301 / povray3 / povscn / level1 / pov / cantelop < prev    next >
Text File  |  1995-11-08  |  2KB  |  65 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Dan Farmer
  3. // Cantelope segments.  Uses onion for the cantelope interior and skin.
  4. // Demonstrates intersection of spheres and planes, onion texture,
  5. // color maps.
  6.  
  7. #version 3.0
  8. global_settings { assumed_gamma 2.2 }
  9.  
  10. #include "colors.inc"
  11.  
  12. #declare Melon = texture {
  13.    finish { ambient 0.2 }
  14.    pigment {
  15.       onion
  16.       color_map {
  17.          [0.0   0.95 color Orange       color Orange ]
  18.          [0.95  0.96 color Orange       color GreenYellow ]
  19.          [0.96  0.98 color GreenYellow  color Khaki  ]
  20.          [0.98  1.00 color NewTan       color DarkTan ]
  21.       }
  22.    }
  23. }
  24.  
  25. camera {
  26.    location <-2, 3, -3>
  27.    direction <0.0, 0.0, 2.0>
  28.    up  <0.0, 1.0, 0.0>
  29.    right <4/3, 0.0, 0.0>
  30.    look_at <0, 0, 0>
  31. }
  32.  
  33.  
  34. // Light source
  35. #declare Grayscale = 0.25
  36. #declare AmbientLight = color red Grayscale green Grayscale blue Grayscale
  37.  
  38. light_source { <-20, 30, -100> color White }
  39.  
  40. light_source { <0, 50, 10> color AmbientLight }
  41.  
  42. // Flat-topped sphere/plane intersection
  43. #declare MelonHalf = intersection {
  44.    sphere { <0, 0, 0>, 1 }                // outer wall
  45.    sphere { <0, 0, 0>, 0.65 inverse }     // inner wall
  46.    plane { y, 0 }                         // top surface
  47.  
  48.    texture { Melon }
  49.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  50. }
  51.  
  52. // Quarter Wedge of above melon
  53. #declare MelonWedge = intersection {
  54.    sphere { <0, 0, 0>, 1 }                 // outer wall
  55.    sphere { <0, 0, 0>, 0.65 inverse }      // inner wall
  56.    plane { y, 0 rotate  45*x }             // top surface
  57.    plane { y, 0 rotate -45*x }             // top surface
  58.  
  59.    texture { Melon }
  60.    bounded_by { sphere { <0, 0, 0>, 1.001 } }
  61. }
  62.  
  63. object { MelonHalf }
  64. object { MelonWedge rotate 30*y translate <2, 0, 2> }
  65.